home *** CD-ROM | disk | FTP | other *** search
- Path: f411.n201!not-for-mail
- Newsgroups: comp.sys.cbm
- X-Comment-To: William Nolan
- From: Pontus Berg <Pontus.Berg@p71.anet.canit.se>
- Date: Fri, 01 Mar 96 21:18:20 +0100
- Subject: Programming (assembler) Question
- Message-ID: <825736419@p71.f411.n201.z2.ftn>
- References: <178469473@andrew.cmu.edu>
- Organization: BoArDgasm, Farsta, Sweden
- X-FTN-AREA: CANIT_COMP_SYS_CBM
- X-FTN-MSGID: 2:201/411.71 3137bce3
- X-FTN-REPLY: andrew.cmu.edu 0aa33a61
- X-FTN-CHRS: IBMPC 2
- X-FTN-Tearline: Spot 1.3a #676
- X-FTN-Origin: BoArDgasm, Farsta, Sweden (2:201/411.71)
- X-FTN-SEEN-BY: 201/411
- X-FTN-PATH: 201/411
- X-FTN-PATH: 201/411
-
- In a message of 28 Feb 96 William Nolan wrote to All:
-
- WN> Okay, here's my problem. In a lot of my Turbo Assembler programs, I use
- WN> the * directive several times to place data at the appropriate locations
- WN> in memory (ie sprite data, character set data, etc). When I compile and
- WN> run under Turbo Assembler, these programs work fine, since I assume that
- WN> as it assembles, TA puts the data in the right places in memory. But
- WN> when I compile to object code and save that to disk, the often programs
- WN> stop working. So I was wondering what to do about this? Any ideas?
-
- It depends on how you assembler it! As I see it, there's two options and I'll
- try to cover both - do you assembler with "<-" + "3" and save the memory or do
- you assemble directly to disk with "<-" + "5"?
-
- If you do the first, I have no help for you as that should be 100% the same as
- assembling and running directly from the assembler.
-
- If you do the latter, then you have encountered a "feature" of TurboAssembler.
- In "assemble to disk" only the very first "*=" does anything. The logical thing
- would be to have the "*=" start a new file or something similar, but it doesn't.
-
- So if you have code from $1000 to $1800 and then have a "*=$2000", the first
- byte after the PC-change command, when assembled to disk does NOT land on $2000
- but on $1800!
-
- f.ex.
-
- *=$1000
-
- sei
- lda #$00
-
- ... ;Lots of more code
-
- label
-
- *=$2000
-
- .byte $00,$00,$00,$00,$00
-
- In this example the bytes land at the label "label", as if the *= just hadn't
- been there!
-
- (Hard to explain in an understandable way but I hop you got the point!
-
- )==========================================================(
- ) o/ Bacchus@FairLight.COM Fido: 2:201/411.71 (
- ) (# I'm a "geek tool" so ask about emulators elsewhere! (
- )=/7=======================================================(
-
- ... The C64 is my only religion!
- It's for real and can be proven and it's for sure divine!
- (Pontus Berg)
-